package pers.course.others;

import java.util.Scanner;

public class Fibonacci2 {
    public static void main(String[] args) {
        long mod = (long) (1e9+7);
        long[] f = new long[1000007];
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        f[0] = 0;
        f[1] = 1;
        f[2] = 1;
        for (int i = 3; i <= n; ++i) {
            f[i] = (f[i - 1] + f[i - 2]) % mod;
        }
        System.out.println(f[n]);
    }
}
